<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            position: relative;
            height: 20px;
            width: 100px;
            border: 1px solid #000;
        }

        .box:hover .sanjiao {
            transform: rotate(405deg);
        }

        .sanjiao {
            position: absolute;
            top: 5px;
            right: 6px;
            height: 10px;
            width: 10px;
            transform: rotate(-45deg);
            border-right: 1px solid red;
            border-bottom: 1px solid red;
            transition: all 1s;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="sanjiao"></div>
    </div>
</body>

</html>